//
// Created by zhouwd on 2019/7/23.
//

#ifndef IPTVSETTING_MEDIA_AUDIO_DECODE_H
#define IPTVSETTING_MEDIA_AUDIO_DECODE_H
#include "base-thread.h"
#include <media/NdkMediaExtractor.h>
#include <android/log.h>
#include <unistd.h>
#include <cstdlib>
#include <cstring>
#define LOG_TAG "CAMERA-RENDER"
#define ALOGE(...) __android_log_print(ANDROID_LOG_ERROR, LOG_TAG, __VA_ARGS__)

typedef class _MEDIA_AUDIO_DECODE {
private:
    AMediaExtractor *extractor;
    AMediaCodec *audioCodec;
public:
    _MEDIA_AUDIO_DECODE();
    ~_MEDIA_AUDIO_DECODE();
    int init(const char *filename);
    int getPcm(void **pcm,size_t *pcm_size);
    int startDecode();
} MediaAudioDecode;


#endif //IPTVSETTING_MEDIA_AUDIO_DECODE_H
